<?php
class Tests{
    public function __construct(public string $name,public int $age){
    }

}
$per1=new Tests("daiwen",34);
var_dump($per1->name, $per1->age);
$per1=new Tests("22",22);